<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Pantalla de guerra</title>
	</head>
<script>
	function show_details() {
		dojo.event.topic.publish("show_detail");
	}
</script>
<body>
	<s:form action="ArmyAction" method="post">
		<s:select headerValue="--Selecciona--" headerKey="-1" 
			list="sectorList" name="sectorId" value="id" listKey="id" 
			listValue="name" label="Sector" onchange="submit()"/>
		
		<s:if test="regimentCollection!=null">
			<s:div id="regimentTableDiv" cssClass="listado">
				<s:iterator value="regimentCollection">
					<table class="tablaListado">
						<tr class="cabeceraTabla">
							<td>Checkbox  </td>
							<td>Regimiento</td>
							<td>Destino</td>
							<td>Orden</td>
							<td>Orden recibida</td>
						</tr>
						<tr class="filaTabla">
							<td>
								<s:checkbox name="kaka" />
							</td>
							<td><s:property value="name"/></td>
							<td>
								<s:select headerValue="--Selecciona--" headerKey="-1" 
									list="neighbourList" name="sectorId" value="id" listKey="id" 
									listValue="name"/>
							</td>
							<td>
								<s:select list="attackOrderList" listValue="%{getText(toString())}" 
									headerValue="--- Selecciona ---" headerKey="1"
									listKey="toString()"/>
							</td>
							<td>
								<s:if test="<s:property value='name'/>==null">
									No
								</s:if>
								<s:if test="<s:property value='name'/>!=null">
									S&iacute;
								</s:if>
							</td>
						</tr>
					</table>
				</s:iterator>
			</s:div>
		</s:if>
	</s:form>
</body>
</html>